import request from '@/utils/request'
//  权限接口的封装
//  获取权限列表
export function getPermission() {
  return request({
    method: 'GET',
    url: '/sys/permission'
  })
}
//  新增权限点
export function addPermission(data) {
  return request({
    method: 'POST',
    url: '/sys/permission',
    data
  })
}
//  获取权限点详情
export function getPermissionDetail(id) {
  return request({
    method: 'GET',
    url: `/sys/permission/${id}`
  })
}
//  修改权限点
export function editPermission(data) {
  return request({
    method: 'PUT',
    url: `/sys/permission/${data.id}`,
    data
  })
}
//  删除权限点
export function delPermission(id) {
  return request({
    method: 'DELETE',
    url: `/sys/permission/${id}`
  })
}
